<?php /* Smarty version 2.6.18, created on 2010-03-11 09:51:11
         compiled from dataFMAOrgAddress.tpl */ ?>
<form method="POST" action="/admin/dataFMAAddressSave">
<div>
	<input type="hidden" name="org_address_id" value="<?php echo $this->_tpl_vars['org_address_id']; ?>
">
	<input type="hidden" name="address_id" value="<?php echo $this->_tpl_vars['address_id']; ?>
">
	<input type="hidden" name="org_id" value="<?php echo $this->_tpl_vars['org_id']; ?>
">
	<div id="drag_bar" class="blue"><h2 class="dotted">Address</h2></div><br>
	<table>
		<tr>
			<td><label>Street</label></td>
			<td><input type="text" name="address1" value="<?php echo $this->_tpl_vars['result'][0]['address1']; ?>
"></td>
		</tr>
		<tr>
			<td><label>City</label></td>
			<td><input type="text" name="city" value="<?php echo $this->_tpl_vars['result'][0]['city']; ?>
"></td>
		</tr>
		<tr>
			<td><label>Province</label></td>
			<td><input type="text" name="province" value="<?php echo $this->_tpl_vars['result'][0]['province']; ?>
"></td>
		</tr>
		<tr>	
			<td><label>Country Code</label></td>
			<td>
				<select name="country_code">
					<?php $_from = $this->_tpl_vars['countries']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['country']):
?>
						<option value="<?php echo $this->_tpl_vars['country']['country_code']; ?>
"
						<?php if ($this->_tpl_vars['country']['country_code'] == $this->_tpl_vars['result'][0]['country_code']): ?>
							selected
						<?php endif; ?>
						>
						<?php echo $this->_tpl_vars['country']['country']; ?>
</option>
					<?php endforeach; endif; unset($_from); ?>
				</select>
			</td>
		</tr>
		<tr>
			<td><label>Address Type</label></td>
			<td>
				<select name="address_type">
					<option value=""> --- </option>
					<option value="Billing" <?php if ($this->_tpl_vars['result'][0]['address_type'] == 'Billing'): ?> selected <?php endif; ?>>Billing</option>
					<option value="Shipping" <?php if ($this->_tpl_vars['result'][0]['address_type'] == 'Shipping'): ?> selected <?php endif; ?>>Shipping</option>
					<option value="Crossdock" <?php if ($this->_tpl_vars['result'][0]['address_type'] == 'Crossdock'): ?> selected <?php endif; ?>>Crossdock</option>
					<option value="Warehouse" <?php if ($this->_tpl_vars['result'][0]['address_type'] == 'Warehouse'): ?> selected <?php endif; ?>>Warehouse</option>
					<option value="Others" <?php if ($this->_tpl_vars['result'][0]['address_type'] == 'Others'): ?> selected <?php endif; ?>>Others</option>
				</select>
			</td>
		</tr>
		<tr>
			<td><label>Active</label></td>
			<td><input type="checkbox" name="inactive" value="1" <?php if ($this->_tpl_vars['result'][0]['inactive'] == 1): ?> checked <?php endif; ?>></td>
		</tr>
		<tr>
			<td><label>Zip</label></td>
			<td><input type="text" name="zip" value="<?php echo $this->_tpl_vars['result'][0]['zip']; ?>
"></td>
		</tr>
	</table>
	<input type="submit" value="Save">
	<input type="button" value="Cancel" onclick="popup('popUpDiv');">
</div>
</form>